package com.elbis.access.wg.api.request.account;

import com.elbis.access.Constants;
import com.elbis.access.response.ResponseEntity;
import com.elbis.access.wg.api.request.AbstractWargamingRequestImpl;
import com.elbis.access.wg.api.request.WOTRequestEntity;
import com.elbis.access.wg.api.response.account.VehicleDataResponse;
import com.elbis.access.wg.api.util.JSONUtil;

public class VehicleDataRequestImpl extends AbstractWargamingRequestImpl {

	public VehicleDataRequestImpl(WOTRequestEntity requestEntity) {
		protocol = Constants.DEFAULT_PROTOCOL;
		method = Constants.DEFAULT_METHOD;
		uri = com.elbis.access.wg.api.Constants.WOT_ACCOUNT_TANKS;
		entity = requestEntity;
	}

	@Override
	public ResponseEntity updateFromResponse() {
		VehicleDataResponse responseImpl = JSONUtil.fromJson(
				response.getResponseData(), VehicleDataResponse.class);
		return responseImpl;
	}

}
